<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link href="__MODES__/assets/css/bootstrap.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="__CSS__/style.css" />
		<link href="__MODES__/assets/css/codemirror.css" rel="stylesheet">
		<link rel="stylesheet" href="__MODES__/assets/css/ace.min.css" />
		<link rel="stylesheet" href="__MODES__/assets/css/font-awesome.min.css" />
		<script src="__MODES__/assets/js/jquery.min.js"></script>
		<script type="text/javascript">
			window.jQuery || document.write("<script src='__MODES__/assets/js/jquery-2.0.3.min.js'>" + "<" + "/script>");
		</script>
		<script type="text/javascript">
			if("ontouchend" in document) document.write("<script src='__MODES__/assets/js/jquery.mobile.custom.min.js'>" + "<" + "/script>");
		</script>
		<script src="__MODES__/assets/js/bootstrap.min.js"></script>
		<script src="__MODES__/assets/js/typeahead-bs2.min.js"></script>
		<script type="text/javascript" src="__JS__/H-ui.js"></script>
		<script type="text/javascript" src="__JS__/H-ui.admin.js"></script>
		
		<script  src="__PLUGINS__/layer/layer.js"></script>
	    <script  src="__PLUGINS__/common.js"></script>
		<title>下级代理</title>
	</head>
	<body>
		<div class="page-content clearfix">
			<div id="Member_Ratings">
				<div class="d_Confirm_Order_style">
					<div class="search_style">

						<div><a title="添加" href="javascript:;" onclick="add()" class="btn btn-xs btn-success">添加</a></div>

					</div>
					<!---->
					<div class="table_menu_list">
						<table class="table table-striped table-bordered table-hover" >
							<thead>
								<tr>
									<th width="25"><label><input type="checkbox" class="ace"><span class="lbl"></span></label></th>
									<th width="80">用户名</th>
									<th width="100">姓名</th>
									<th width="100">电话</th>
									<th width="100">身份证</th>
									<th width="150">客户承载量</th>
									<th width="100">可用数量</th>
									<th width="100">状态</th>
									<th width="120">代理城市</th>
									<th width="120">公司名称</th>
								</tr>
							</thead>
							<tbody>
								{volist name='list' id='v' }
									<tr>
										<td><label><input type="checkbox" class="ace"><span class="lbl"></span></label></td>
										<td>{$v.agent_account}</td>
										<td>{$v.agent_name}</td>
										<td>{$v.agent_phone}</td>
										<td>{$v.agent_idcard}</td>
										<td>{$v.agent_capacity}</td>
										<td>{$v.agent_can_allot}</td>
										<td>
											{switch v.grade_state}
											    {case 0}正常{/case}
											    {case 1}冻结{/case}
											    {case 2}申请{/case}
											    {case 3}拒绝{/case}
											{/switch}
										</td>
										<td>{$v.agent_city}</td>
										<td>{$v.agent_company}</td>
									</tr>
								{/volist}
							</tbody>
						</table>
					</div>
					<div>
                        {//$list|raw}
		            </div>
				</div>
			</div>
		</div>
		<!--添加用户图层-->
		
	</body>

</html>
<script>

	jQuery(function($) {
		
		$('#search').on('click', function() {
			var text = $('#keywords').val();
			if(text==''){
				layer.msg('请输入搜索关键词');
				return false;
			}
			window.location.href = "{:Url('Admin/Grade/index')}?keywords="+text; 
		});
		
		$('#searchAout').on('click', function() {
			window.location.href = "{:Url('Admin/Grade/index')}"; 
		});
		
		$('table th input:checkbox').on('click', function() {
			var that = this;
			$(this).closest('table').find('tr > td:first-child input:checkbox').each(function() {
				this.checked = that.checked;
				$(this).closest('tr').toggleClass('selected');
			});

		});

	});

</script>